html {}

body {
    min-height: 100vh;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #666;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #3366ff;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #3366ff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-item.active {
    color: #3366ff;
    font-weight: bold;
}

.nav-item.active::after {
    width: 100%;
}

.user-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logout-box {
    z-index: 1000;
    position: absolute;
    top: 55px;
    right: -10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.user-avatar:hover .logout-box,
.logout-box:hover {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease 0.1s; /* 增加0.1秒延迟 */
}

.logout-box::before {
    content: '';
    position: absolute;
    top: -25px;
    left: -25px;
    right: -25px;
    height: 40px;
    background: transparent;
    pointer-events: none;
}

.user-avatar:hover .logout-box,
.user-avatar:hover .logout-box::before,
.logout-box:hover,
.logout-box:hover::before {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease, display 0s 0.3s;
}

.logout-box {
    transition: all 0.3s ease 0.15s;
    visibility: hidden;
}

.user-avatar:hover .logout-box,
.logout-box:hover {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.15s;
}

.logout-box::before {
    transition: inherit;
}

.user-avatar:hover .logout-box::before,
.logout-box:hover::before {
    opacity: 1;
    visibility: visible;
}

#logoutBtn:hover {
    background: #ff7875;
}

.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #267e3e;
    color: white;
    padding: 15px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}
